<?php

include_once('global.php');
include_once('thumbs.php');

// Original images dir
$imagesdir = $homedir."/images";


debug("Generating thumbs...");
$dir = opendir($imagesdir);
while( ($file=readdir($dir))==true ) {
  if( file!='.' && $file!=".." && !is_dir($file) ) {
    debug("Generating thumbs for $file");
    createThumb("$imagesdir/$file", "$thumbsdir/$file", $thumbsSize, $thumbsSize, $canvas);
    createThumb("$imagesdir/$file", "$webimagesdir/$file", $webImagesWidth, $webImagesHeight, $webcanvas, $imagesdir, $webimagesdir);
  }
}
closedir($dir);


?>
